package com.xd.service.admin.XTGLY.impl;

import com.xd.Mapper.ProductMapper;
import com.xd.Result.CommonResult;
import com.xd.service.admin.XTGLY.AddProductService;
import com.xd.service.admin.XTGLY.impl.BrandProductServiceImpl;
import com.xd.vo.productVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AddProductServiceImpl implements AddProductService {
    @Autowired
    ProductMapper addProduct;
    @Autowired
    BrandProductServiceImpl brandProductService;
    @Override
    public CommonResult addProduct(productVo productVo) {
        CommonResult brandToADDProduct = brandProductService.getBrandToADDProduct(productVo);
        if (brandToADDProduct.isSuccess()){
                addProduct.addProductMapper(productVo);
        }
        return brandToADDProduct;

    }
}
